Imports System.Data.SqlClient
Imports Microsoft.ApplicationBlocks.Data.SqlHelper

Public Class Ubicaciones

    Public Function GenerarUbicacion(ByVal ParamArray Dat() As String)
        Dim DS As New DataSet
        DS = ExecuteDataset(My.Settings.MiCadena, CommandType.StoredProcedure, "UbicacionGenerar", _
        New SqlParameter("@Nom", Dat(0)), New SqlParameter("@Des", Dat(1)), New SqlParameter("@Obs", Dat(2)))
        Return DS
    End Function

    Public Function ObtenerUbicaciones(ByVal ParamArray Dat() As String)
        Dim DS As New DataSet
        DS = ExecuteDataset(My.Settings.MiCadena, CommandType.StoredProcedure, "UbicacionesObtener", _
        New SqlParameter("@CodUbi", Dat(0)), New SqlParameter("@Tip", Dat(1)))
        Return DS
    End Function

    Public Function EliminarUbicacion(ByVal CodUbi As Integer)
        Dim DS As New DataSet
        DS = ExecuteDataset(My.Settings.MiCadena, CommandType.StoredProcedure, "UbicacionEliminar", _
        New SqlParameter("@CodUbi", CodUbi))
        Return DS
    End Function

    Public Function ModificarUbicacion(ByVal NomUbi As String)
        Dim DS As New DataSet
        DS = ExecuteDataset(My.Settings.MiCadena, CommandType.StoredProcedure, "UbicacionesModificar", _
        New SqlParameter("@NomUbi", NomUbi))
        Return DS
    End Function
End Class

